home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / util / Mac F2C 1.3.sit / Mac F2C 1.3 / Mac F2C Extras / F2C CW MPW_ToolServer Tools / ToolServer READ ME < prev    next >
Text File  |  1995-10-31  |  4KB  |  115 lines

  1. USING MPW TOOLS WITH CODEWARRIOR IDE, TOOLSERVER AND MAC F2C
  2.  
  3. The folder "MPW/Toolserver Tools" contains three MPW tools: F2CMake,
  4. CWMake and CWOpen.
  5.  
  6. Metrowerks CodeWarrior comes with the complete MPW environment and with
  7. Toolserver, a program that lets you execute MPW tools and scripts.
  8. If you start Toolserver from the CW environment, you get a text shell
  9. window where you can type commands. Please refer to the Toolserver
  10. documentation on the CW CD for more information.
  11.  
  12. F2CMake accepts a command line string containing Unix style options and
  13. one or more filenames to send them in a "kAEf2cEvent" AppleEvent to
  14. Mac F2C which will translate the file(s). If Mac F2C is not currently
  15. running, F2CMake will try to launch it.
  16.  
  17. CWMake simply sends a "Make" event to the CW enviroment that is
  18. currently running (IDE, PPC C or 68K C).
  19.  
  20. CWOpen sends an 'Open' AppleEvent to the CW IDE, PPC C or 68K C compiler,
  21. whichever is currently running. The command line should contain the
  22. name(s) of the file(s) to open.
  23.  
  24. With the help of these tools you can automate the building process
  25. of Fortran programs. You can edit your Fortran files and just execute
  26. a Makefile which scans all the files belonging to a project, tells
  27. Mac F2C to translate the ones that have to and tells CW to build the
  28. program. CWOpen is not needed in this progress, but it is useful if
  29. you would like to open, say, all the .e files that Mac F2C produces
  30. (Just type "CWOpen ≈.e" in the Toolserver shell window).
  31.  
  32.  
  33. INSTALLATION
  34.  
  35.     - Copy "F2CMake", "CWMake" and "CWOpen" into the "Tools" folder
  36.       that Toolserver uses
  37.       
  38.     - Copy "F2C.Help" into the Toolserver folder.
  39.  
  40.     - Copy "Make" from the MPW distribution into the same folder
  41.     
  42.     - Copy the MPW script "BuildProgram" into the "Scripts"
  43.       folder of Toolserver
  44.  
  45.     - Set the appropiate options in the "Compiler Interactions..."
  46.       dialog of Mac F2C. You can uncheck all options if you want
  47.       your makefile to control the build process completely, but
  48.       it makes sense to set the interaction mode to "Touch changed
  49.       files" and check the "Add output C/C++ files to active project
  50.       as necessary".
  51.       
  52.  
  53. USAGE
  54.  
  55. First Build:
  56.  
  57.     - Use Mac F2C manually to translate your Fortran source
  58.       into C.
  59.       
  60.     - Add the resulting C sources to the "Empty" project and let
  61.       CW make the program.
  62.     
  63.     - Enter a Makefile like this one in a new editor window:
  64.     
  65.     
  66. OBJECTS =   prog1.c ∂
  67.             prog2.c ∂
  68.             prog3.c ∂
  69.             prog4.c
  70.  
  71. Basistest   ƒƒ  {OBJECTS}
  72.     CWMake
  73.         
  74. .c  ƒ   .f
  75.     F2CMake -f -!i8 -A -a -E -ec -R -w66 {Default}.f
  76.         
  77.       
  78.       The source file names (prog1.c, prog2.c,...) as well as the
  79.       F2C options are just examples.
  80.       
  81.     - Save the Makefile under the name "Makefile" into your
  82.       project folder.
  83.  
  84.  
  85. Subsequent Builds:
  86.       
  87.     - Start Toolserver.
  88.     
  89.     - Use the "Directory" command to move to your project folder.
  90.     
  91.     - Edit your Fortran source files.
  92.     
  93.     - Type "BuildProgram <name>", where <name> is the name of the
  94.       program as given in the CW Preferences of your project.
  95.       The commands needed to update the project are executed and
  96.       written to the shell window. Mac F2C runs faster if you bring
  97.       it to the foreground.
  98.  
  99.  
  100. If you need help about one of the F2C MPW tools, type
  101.  
  102.     help -f "{MPW}F2C.Help" toolname
  103.     
  104.     
  105. If you don't like to type long command names (like me), include a
  106. few alias entries in your "UserStartupTS" file, e.g.
  107.  
  108. Alias cd Directory
  109. Alias touch setfile -m .
  110. Alias edit CWOpen
  111. Alias pmake BuildProgram
  112.  
  113. You can even include a "Directory <whereYourProjectsAre>" command
  114. here so you don't have to type the pathname all the time.
  115.